﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <title>联系信息</title>
    <!--<link href="../../script/css/bootstrap.min.css" rel="stylesheet" />
    <link href="../../script/css/bootstrap-table.css" rel="stylesheet" />
    <script src="../../script/js/jquery-1.12.3.js"></script>
    <script src="../../script/js/bootstrap.min.js"></script>
    <script src="../../script/js/bootstrap-table.js"></script>
    <script src="../../script/js/bootstrap-table-zh-CN.js"></script>
    <script src="../../script/js/cus-grid.js"></script>-->
</head>
<body>
    <div style="width:100%">
        <table name="base_companyinfo"></table>
    </div>
    <script name="loadPage">
        var base_companyinfo_init;

        var base_companyinfo = {
        data: {
                data:[]
        },
        detailLink:[],
            rowbtns:[],
        toolbtns:[],
        cols:[],
        new: function () {
            base_companyinfo_init.editLoad('../base_companyinfo/base_companyinfo_edit.html');
        },
        edit: function () {
            base_companyinfo_init.editLoad('../base_companyinfo/base_companyinfo_edit.html');
        },
        del: function () {
            $.post('/api/base_companyinfo/del', { id: base_companyinfo_init.getId_edit }, function () {
                window.location.reload();
        });
        },
        mdel: function () {
            $.post('/api/base_companyinfo/mdel', { objs: base_companyinfo_init.getSelects() }, function () {
                window.location.reload();
        });
        },
        check: function () {

        },
        mcheck: function () {

        }
        };

        $(function () {
            base_companyinfo.cols = [
{field: 'contact',title: '联系人'}
,{field: 'mobile',title: '联系电话'}
,{field: 'address',title: '地址'}
,{field: 'remark',title: '备注'}
//,{field: 'companyid',title: '公司'}
                ];

            base_companyinfo.rowbtns.push({
                text: '编辑',
                fn: 'base_companyinfo.edit'
            });
            base_companyinfo.rowbtns.push({
                text: '删除',
                fn: 'base_companyinfo.del'
            });
            base_companyinfo.rowbtns.push({
                jstr: '<button class="btn btn-danger" onclick="base_companyinfo.check();">审核</button>'
            });

            base_companyinfo.toolbtns.push({
                text: '新增',
                fn: 'base_companyinfo.new'
            });
            base_companyinfo.toolbtns.push({
                text: '删除',
                fn: 'base_companyinfo.mdel'
            });
            base_companyinfo.toolbtns.push({
                jstr: '<button class="btn btn-danger" onclick="base_companyinfo.mcheck();">审核</button>'
            });

            //base_companyinfo.detailLink.push({
            //    tablename: 'table2',
            //    parentid: 'name',
            //    caption: 'tname',
            //    isActive: true
            //});

            base_companyinfo_init = base_companyinfo_init == undefined ? cusGrid() : function () {
                return base_companyinfo_init.reCreate();
            }();
            $.get('/api/base_companyinfo/get',
{ companyid: base_company_init.getId_detail_grid() } ,
                    function (data) {
            base_companyinfo.data = data;
        base_companyinfo_init.init({
            data: base_companyinfo.data,
                detailLink: base_companyinfo.detailLink,
                    rowbtns: base_companyinfo.rowbtns,
                        toolbtns: base_companyinfo.toolbtns,
                            cols: base_companyinfo.cols,
                                isSelect:true,
                                tableName: 'base_companyinfo'
                            });
        base_companyinfo_init.initTable();
        });
        })
    </script>



</body>
</html>
